// var arrWeeks = ['星期天','星期一','星期二','星期三','星期四','星期五','星期六']
var strWeekName = ''
var date = new Date('2017-03-31')
switch (date.getDay()){
    case 0:
        strWeekName = '星期天'
        console.log(0)
        break;
    case 1:
        strWeekName = '星期一'
        console.log(1)
        break;
    case 2:
        strWeekName = '星期二'
        console.log(2)
        break;
    default:
        strWeekName = '未定义'
        console.log(3)
        break;
}
console.log(strWeekName)


switch(false){
    case 1<2:
        console.log('1111')
        break;
    case 1>2:
        console.log('2222')
        break;


    case 0:
        strWeekName = '星期天'
        console.log(0)
        break;
    case 1:
        strWeekName = '星期一'
        console.log(1)
        break;
    case 2:
        strWeekName = '星期二'
        console.log(2)
        break;
    default:
        strWeekName = '未定义'
        console.log(3)
        break;
}